home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
vbmbox
/
msgbox.bas
< prev
next >
Wrap
BASIC Source File
|
1995-02-09
|
3KB
|
57 lines
Option Explicit
Type MBValue
Buttons As Integer
Icon As Integer
Modal As Integer
DefButton As Integer
Ret As Integer
End Type
' Function Parameters
' MsgBox parameters
Global Const MB_OK = 0 ' OK button only
Global Const MB_OKCANCEL = 1 ' OK and Cancel buttons
Global Const MB_ABORTRETRYIGNORE = 2 ' Abort, Retry, and Ignore buttons
Global Const MB_YESNOCANCEL = 3 ' Yes, No, and Cancel buttons
Global Const MB_YESNO = 4 ' Yes and No buttons
Global Const MB_RETRYCANCEL = 5 ' Retry and Cancel buttons
Global Const MB_ICONSTOP = 16 ' Critical message
Global Const MB_ICONQUESTION = 32 ' Warning query
Global Const MB_ICONEXCLAMATION = 48 ' Warning message
Global Const MB_ICONINFORMATION = 64 ' Information message
Global Const MB_APPLMODAL = 0 ' Application Modal Message Box
Global Const MB_DEFBUTTON1 = 0 ' First button is default
Global Const MB_DEFBUTTON2 = 256 ' Second button is default
Global Const MB_DEFBUTTON3 = 512 ' Third button is default
Global Const MB_SYSTEMMODAL = 4096 ' System Modal
' MsgBox return values
Global Const IDOK = 1 ' OK button pressed
Global Const IDCANCEL = 2 ' Cancel button pressed
Global Const IDABORT = 3 ' Abort button pressed
Global Const IDRETRY = 4 ' Retry button pressed
Global Const IDIGNORE = 5 ' Ignore button pressed
Global Const IDYES = 6 ' Yes button pressed
Global Const IDNO = 7 ' No button pressed
'Declare Function SendMessage Lib "user" (ByVal hWd%, ByVal wMsg%, ByVal Param%, ByVal lParam&) As Long
Declare Function SendMessage Lib "user" (ByVal hWd%, ByVal wMsg%, ByVal Param%, lParam As Any) As Long
Global Const WM_USER = &H400
Global Const EM_LINELENGTH = WM_USER + 17
Global Const EM_GETLINECOUNT = WM_USER + 10
Declare Function PostMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Integer
Declare Function IsIconic Lib "user" (ByVal hWnd As Integer) As Integer
'Declare Function GetActiveWindow Lib "User" () As Integer
Declare Function FindWindow Lib "User" (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Integer
'Declare Function WinExec Lib "Kernel" (ByVal lpCmdLine As String, ByVal nCmdShow As Integer) As Integer
Declare Function GetClassName Lib "User" (ByVal hWnd As Integer, ByVal lpClassName As String, ByVal nMaxCount As Integer) As Integer
Declare Function SetFocusAPI Lib "User" Alias "SetFocus" (ByVal hWnd As Integer) As Integer